Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Signal Issue on Windows #1159

Closed
wants to merge 15 commits into from
Closed

Conversation

H0llyW00dzZ
Copy link

What type of PR is this?

  • [+] fix(signals.go): add build tags for non-windows systems
  • [+] fix(signals_test.go): add build tags for non-windows systems
  • [+] feat(signals_windows.go): add build tags for windows systems
  • [+] feat(signals_windows_test.go): add build tags for windows systems

What this PR does / why we need it:

syscall.SIGTSTP is not available on Windows.

Which issue(s) this PR fixes:

Fixes #1149

Special notes for your reviewer:

build specific tags

Does this PR introduce a user-facing change?

Only build specific tags

- [+] fix(signals.go): add build tags for non-windows systems
- [+] fix(signals_test.go): add build tags for non-windows systems
- [+] feat(signals_windows.go): add build tags for windows systems
- [+] feat(signals_windows_test.go): add build tags for windows systems
@k8s-ci-robot k8s-ci-robot added the release-note Denotes a PR that will be considered when it comes time to generate release notes. label Jan 4, 2024
Copy link

linux-foundation-easycla bot commented Jan 4, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@k8s-ci-robot
Copy link
Contributor

Welcome @H0llyW00dzZ!

It looks like this is your first PR to kubernetes-sigs/promo-tools 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes-sigs/promo-tools has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the area/artifacts Issues or PRs related to the hosting of release artifacts for subprojects label Jan 4, 2024
@k8s-ci-robot k8s-ci-robot added cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 4, 2024
@k8s-ci-robot
Copy link
Contributor

Hi @H0llyW00dzZ. Thanks for your PR.

I'm waiting for a kubernetes-sigs member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Jan 4, 2024
H0llyW00dzZ and others added 2 commits January 5, 2024 04:00
- [+] refactor(signals_windows_test.go): Rename file from singals_windows_test.go to signals_windows_test.go
@k8s-ci-robot
Copy link
Contributor

Adding label do-not-merge/contains-merge-commits because PR contains merge commits, which are not allowed in this repository.
Use git rebase to reapply your commits on top of the target branch. Detailed instructions for doing so can be found here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

- [+] fix(signals.go): add build tags for non-windows systems
- [+] fix(signals_test.go): add build tags for non-windows systems
- [+] feat(signals_windows.go): add build tags for windows systems
- [+] feat(signals_windows_test.go): add build tags for windows systems
- [+] refactor(signals_windows_test.go): Rename file from singals_windows_test.go to signals_windows_test.go
- [+] chore(pr.go): Add note about complexity and suggest splitting into smaller functions
- [+] chore(signals.go): Update note to specify that it builds on Unix/Linux systems
- [+] chore(signals_test.go): Update note to specify that it builds on Unix/Linux systems
Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some initial comments, also will need to check if need to change the build process to adjust for this

/ok-to-test

/assign @saschagrunert for second review

cmd/kpromo/cmd/pr/pr.go Outdated Show resolved Hide resolved
internal/legacy/signals/signals_windows.go Outdated Show resolved Hide resolved
internal/legacy/signals/signals_windows.go Show resolved Hide resolved
internal/legacy/signals/signals_windows_test.go Outdated Show resolved Hide resolved
internal/legacy/signals/signals_windows_test.go Outdated Show resolved Hide resolved
@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jan 5, 2024
- [+] chore(pr.go): Update note about complexity and suggest splitting into smaller functions
- [+] chore(signals): update copyright year to 2024 in signals_windows.go and signals_windows_test.go files
- [+] test(signals_windows_test.go): add comments to explain why certain signals are not tested
- [+] refactor(pr.go): split runPromote function into smaller functions for better readability and maintainability
@H0llyW00dzZ
Copy link
Author

/retest

@H0llyW00dzZ
Copy link
Author

Note

boilerplate might need to changed as well

./hack/verify-boilerplate.sh
4 files have incorrect boilerplate headers:
internal/legacy/signals/signals.go
internal/legacy/signals/signals_test.go
internal/legacy/signals/signals_windows.go
internal/legacy/signals/signals_windows_test.go
make: *** [Makefile:146: verify-boilerplate] Error 1

because this correct

//go:build !windows
// +build !windows

// Note: this build on unix/linux systems

/*
Copyright 2021 The Kubernetes Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

about

//go:build !windows
// +build !windows

must be on the top

@cpanato
Copy link
Member

cpanato commented Jan 19, 2024

we have other files in other repos that the go build is not in the top and works with no problem

@cpanato
Copy link
Member

cpanato commented Jan 19, 2024

cc @puerco @saschagrunert @xmudrii

internal/legacy/signals/signals.go Show resolved Hide resolved
internal/legacy/signals/signals_test.go Show resolved Hide resolved
internal/legacy/signals/signals_windows.go Outdated Show resolved Hide resolved
cmd/kpromo/cmd/pr/pr.go Outdated Show resolved Hide resolved
internal/legacy/signals/signals_windows_test.go Outdated Show resolved Hide resolved
internal/legacy/signals/signals_windows_test.go Outdated Show resolved Hide resolved
internal/legacy/signals/signals_windows_test.go Outdated Show resolved Hide resolved
internal/legacy/signals/signals_windows_test.go Outdated Show resolved Hide resolved
- [+] test(signals_windows_test.go): remove unnecessary comments and update comment about unavailable signals on Windows
- [+] chore(signals_windows.go): remove commented out code for SIGTSTP signal
- [+] test(signals_windows_test.go): comment out unused signal tests
- [+] test(signals_windows_test.go): comment out unused signal tests
@H0llyW00dzZ
Copy link
Author

/retest

- [+] chore(pr.go): update comment to reference issue kubernetes-sigs#1177 and clarify code readability concerns
@k8s-ci-robot
Copy link
Contributor

@H0llyW00dzZ: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-cip-verify f3e8576 link true /test pull-cip-verify

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@@ -158,6 +158,9 @@ func init() {
}
}

// Issue #1177: This function is overly complex and difficult to read, both for humans and machines.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add the full like and drop this comment

@cpanato
Copy link
Member

cpanato commented Jan 20, 2024

i will check the boilerplate issue

@cpanato
Copy link
Member

cpanato commented Jan 20, 2024

and I would like to get evidence the current build still works and also it working for windows as well

@H0llyW00dzZ
Copy link
Author

and I would like to get evidence the current build still works and also it working for windows as well

a issue its only signal that not available on windows

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 19, 2024
@xmudrii
Copy link
Member

xmudrii commented Apr 22, 2024

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 22, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 21, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Aug 20, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/artifacts Issues or PRs related to the hosting of release artifacts for subprojects area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/contains-merge-commits lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug installation on windows
5 participants